#include<bits/stdc++.h>
using namespace std;
int n;
int r[2*N],idx,cnt;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>r[i];
    sort(r+1,r+1+n);
    idx=1;
    cnt=0;
    for(int i=1;i<=n;i++){
        if(r[i]<r[idx]){
            cnt++;
            idx++;
        }
        else{
            while(r[i]>=r[idx]){
                idx++;
                if(idx>n)break;
            }
            if(idx<=n && r[i]<r[idx])cnt++;
        }
        if(idx==n)break;
    }
    cout<<n-cnt<<endl;

    return 0;
}
/*
I use er fen zui da pi pei
wo shi ruo zhi!
*/
